import request from '@/utils/request'

export const frontMenuList = function(params){
  return request({
    url: '/front_menu/list',
    method: 'get',
    params: params
  })
}
export const frontMenuStatusChange = function(params){

  let url = '/front_menu/status_switch?relatetion_id='+params.relatetion_id
  delete params.relatetion_id
  return request({
    url: url,
    method: 'post',
    data: params
  })
}

export const frontMenuRuleTreeList = function(params){
  return request({
    url: '/front_menu/rule_tree',
    method: 'get',
    params: params
  })
}


export const frontMenuNameList = function(params){
  return request({
    url: '/front_menu/name',
    method: 'get',
    params: params
  })
}

export const frontMenuAdd = function(params){
  return request({
    url: '/front_menu/add',
    method: 'post',
    data: params
  })
}

export const frontMenuEditGet = function(params){
  return request({
    url: '/front_menu/edit',
    method: 'get',
    params: params
  })
}

export const frontMenuEditPost = function(params){
  return request({
    url: '/front_menu/edit',
    method: 'post',
    data: params
  })
}

export const frontMenuDel = function(params){
  return request({
    url: '/front_menu/del',
    method: 'post',
    data: params
  })
}



export const allFrontMenu = function(params){
  return request({
    url: '/front_menu/all_name',
    method: 'get',
    params: params
  })
}

